<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!-- The guest home page, containing the fields to log-in and the registration link -->
<ui:composition template="/templates/master_template.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    
    <ui:define name="title">MeteoCal</ui:define>

    <ui:define name="content">
        
        
        <f:view>

            <p:panel id="login_container">

                <h1>Login</h1>
                
                <h:form id="login_form">
                    
                    <p:growl id="growl" showDetail="true" showSummary="false"/>  
                    
                    <p:panelGrid columns="2" id="login_grid" styleClass="table_no_border">

                        <p:outputLabel for="username" value="E-mail"/>
                        <p:inputText id="username" value="#{loginBean.username}"/>
   
                        <p:outputLabel for="password" value="Password"/>
                        <p:password id="password" value="#{loginBean.password}"/>
                        
                    </p:panelGrid>

                    <p:commandButton id="login_button" styleClass="login_button" value="Login" action="#{loginBean.login()}" update="growl"/>
                    
                </h:form>

            </p:panel>

        </f:view>
        
        
        
        
        
    </ui:define>
</ui:composition>







